<?php
session_start();
$user = $_SESSION["user"];

$title = $_POST["Title"];
$content = $_POST["Content"];
$updateTime = date_format(new DateTime(),"Y-m-d H:i:s");
$id = $_GET["id"];
$sql ="UPDATE article SET Title='$title',Content='$content',UpdateTime='$updateTime' WHERE Id='$id' AND AuthorID=".$user["Id"];
$conn = new mysqli("localhost","root","","myblog");
$rs = $conn -> query($sql);
if($conn->error){
    echo $conn->error;
    die($conn->error);
}
//echo "修改成功!"
$url = "test_7_article_list.php";
Header("location:$url");
die("");
?>